import { defineStore } from "pinia";
import { selector } from "@/utils/utils";

const composeStore = defineStore("compose", {
  state: () => {
    return {
      areaData: {
        // 选中区域包含的组件以及区域位移信息
        style: {
          top: 0,
          left: 0,
          width: 0,
          height: 0,
        },
        components: [],
      },
      editor: null,
    };
  },
  actions: {
    getEditor() {
      this.editor = selector("#editor");
    },
  },
  getters: {},
});
export default composeStore;
